home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbstrcpy.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                 dbstrcpy
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbstrcpy
  6.  
  7.   FUNCTION:
  8.        Copy a portion of the command buffer.
  9.  
  10.   SYNTAX:
  11.        RETCODE dbstrcpy(dbproc, start, numbytes, dest)
  12.  
  13.        DBPROCESS *dbproc;
  14.        int       start;
  15.        int       numbytes;
  16.        char      *dest;
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbstrcpy                Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o dbstrcpy() copies a portion of the command buffer to a  program
  30.          variable.  The copy is null-terminated.
  31.        o Internally, the command buffer is a linked  list  of  non-null-
  32.          terminated   text   strings.    dbgetchar(),   dbstrcpy(),  and
  33.          dbstrlen() together provide a way to locate and copy  parts  of
  34.          the command buffer.
  35.  
  36.        o dbstrcpy() assumes that the  destination  is  large  enough  to
  37.          receive  the  source  string.   If not, a segmentation fault is
  38.          likely.
  39.  
  40.   PARAMETERS:
  41.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  42.            connection for a particular front-end/SQL Server process.  It
  43.            contains all the information that DB-Library uses  to  manage
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                 dbstrcpy
  47.   ______________________________________________________________________
  48.            communications and data between the front end and SQL Server.
  49.        start -  Indicates which character in the command buffer to start
  50.            copying from.  The first character is the 0'th character.  If
  51.            start is greater than  the  length  of  the  command  buffer,
  52.            dbstrcpy() inserts a null terminator at dest[0].
  53.        numbytes -  The number of characters to copy.  If numbytes is -1,
  54.            dbstrcpy()  will copy as many bytes as possible.  It is legal
  55.            to copy 0 bytes, in which case dbstrcpy() inserts a null ter-
  56.            minator  at  dest[0].  If there are not numbytes available to
  57.            copy, dbstrcpy() copies the number  of  bytes  available  and
  58.            returns SUCCEED.
  59.        dest -  A pointer to the data space to  copy  the  source  string
  60.            into.
  61.  
  62.   RETURNS:
  63.        SUCCEED or FAIL. dbstrcpy() returns FAIL if start is negative.
  64.  
  65.  
  66.  
  67.  
  68.   dbstrcpy                Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.  
  71.   SEE ALSO:
  72.        dbcmd, dbfcmd, dbfreebuf, dbgetchar, dbstrlen
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.